// vuex模块
export default {
  namespaced: true,
  state: {
    count: 0,
  },
  actions: {
    setCount({ commit }, num) {
      // 触发mutation函数
      commit("SET_COUNT", num);
    },
  },
  mutations: {
    SET_COUNT(state, num) {
      state.count += num;
    },
  },
};
